
var os = require('os');

function cpuInfo(obj) {
    
    console.log("cpu architecture: %s", os.arch());

    var cpus = os.cpus();
    console.log(JSON.stringify(cpus));
}

cpuInfo(os);

console.log("hostname: %s", os.hostname());
console.log("uptime: %s", os.uptime());
console.log("os type: %s", os.type());
console.log("release: %s", os.release());
console.log("platform: %s", os.platform());
console.log("user info: %s", os.userInfo());
console.log("freemem: %sM", os.freemem()/1024/2014);